package cloudPayAdmin.admin.dbapp.repo.hicatcard.user;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import cloudPayAdmin.admin.dbapp.entity.hicatcard.user.TUser;
import cloudPayAdmin.admin.dbapp.entity.hicatcard.user.TUserPlan;

public interface UserPlanRepo extends JpaRepository<TUserPlan, Long>, JpaSpecificationExecutor<TUserPlan> {
	
	@Query("select u from TUserPlan u where u.type = ?1 and u.enable = true order by u.createTime desc")
	List<TUserPlan> findByType(Integer type);

}
